#!usr/bin/env python  
# -*- coding:utf-8 _*-
"""
@author:robot
@file: db_info_pdk.py
@version:
@time: 2022/05/27
"""
source = 'source'
target = 'target'
source_and_target = 'source_and_target'

source_db = 'source'
target_db = 'target'
source_and_target_db = 'source_and_target'
common_ip = '183.238.176.18'

share_cdc = {'shareCdcEnable': True}

__all__ = [
    'Mysql',
    'MongoDB',
    'Postgres',
    'Oracle',
    'Sqlserver',
    'ES',

    'OceanBase',
    'Doris',
    'ClickHouse',
    'Gbase8a',
    'Gbase8s',
    'Redis',
    'Hive',

    'Dummy',

    'ActiveMQ',
    'RabbitMQ',
    'RocketMQ',
    'Kafka',

    'DB2',
    'Mariadb'
]


class Mysql_PXC:
    database_type = 'Mysql-PXC'

    AUTO_MYSQL_PXC_SOURCE = {
        "name": "AUTO_MYSQL_PXC_SOURCE",
        "database_type": database_type,
        "database_host": "192.168.1.132",
        "database_port": "3301",
        "database_name": source_db,
        "database_username": "root",
        "plain_password": "admin",
        "connection_type": source,
        "config": {
            "host": "192.168.1.132",
            "port": 3301,
            "timezone": "Database Timezone",
            "database": source_db,
            "username": "root",
            "password": "admin"
        },
        **share_cdc
    }

    AUTO_MYSQL_PXC_TARGET = {
        "name": "AUTO_MYSQL_PXC_TARGET",
        "database_type": database_type,
        "database_host": "192.168.1.132",
        "database_port": "3301",
        "database_name": target_db,
        "database_username": "root",
        "plain_password": "admin",
        "connection_type": target,
        "config": {
            "host": "192.168.1.132",
            "port": 3301,
            "timezone": "Database Timezone",
            "database": target_db,
            "username": "root",
            "password": "admin"
        },
        **share_cdc
    }


class Mariadb:
    database_type = 'Mariadb'

    AUTO_MARIADB_SOURCE = {
        "name": "AUTO_MARIADB_SOURCE",
        "database_type": database_type,
        "database_host": common_ip,
        "database_port": "43061",
        "database_name": source_db,
        "database_username": "root",
        "plain_password": "Gotapd8#",
        "connection_type": source,
        "config": {
            "host": common_ip,
            "port": 43061,
            "timezone": "Database Timezone",
            "database": source_db,
            "username": "root",
            "password": "Gotapd8#"
        },
        **share_cdc
    }

    AUTO_MARIADB_TARGET = {
        "name": "AUTO_MARIADB_TARGET",
        "database_type": database_type,
        "database_host": common_ip,
        "database_port": "43061",
        "database_name": target_db,
        "database_username": "root",
        "plain_password": "Gotapd8#",
        "connection_type": target,
        "config": {
            "host": common_ip,
            "port": 43061,
            "timezone": "Database Timezone",
            "database": target_db,
            "username": "root",
            "password": "Gotapd8#"
        },
        **share_cdc
    }


class Mysql:
    database_type = 'Mysql'

    AUTO_MYSQL_5562_SOURCE = {
        "name": "AUTO_MYSQL_5562_SOURCE",
        "database_type": database_type,
        "database_host": common_ip,
        "database_port": "33061",
        "database_name": source_db,
        "database_username": "root",
        "plain_password": "Gotapd8",
        "connection_type": source,
        "config": {
            "host": common_ip,
            "port": 33061,
            "timezone": "Database Timezone",
            "database": source_db,
            "username": "root",
            "password": "Gotapd8"
        },
        **share_cdc
    }
    AUTO_MYSQL_5562_TARGET = {
        "name": "AUTO_MYSQL_5562_TARGET",
        "database_type": database_type,
        "database_host": common_ip,
        "database_port": "33061",
        "database_name": target_db,
        "database_username": "root",
        "plain_password": "Gotapd8",
        "connection_type": target,
        "config": {
            "host": common_ip,
            "port": 33061,
            "timezone": "Database Timezone",
            "database": target_db,
            "username": "root",
            "password": "Gotapd8"
        },
    }
    docker_mysql_5733 = {
        "name": "docker_mysql_5733",
        "database_type": database_type,
        "database_host": common_ip,
        "database_port": "33063",
        "database_name": "INSURANCE",
        "database_username": "root",
        "plain_password": "Gotapd8",
        "connection_type": source_and_target,
        "config": {
            "host": common_ip,
            "port": 33063,
            "timezone": "Database Timezone",
            "database": "INSURANCE",
            "username": "root",
            "password": "Gotapd8"
        }
    }
    docker_mysql_8023_target = {
        "name": "docker_mysql_8023_target",
        "database_type": database_type,
        "database_host": common_ip,
        "database_port": "33064",
        "database_name": "target",
        "database_username": "root",
        "plain_password": "Gotapd8",
        "connection_type": source_and_target,
        "config": {
            "host": common_ip,
            "port": 33064,
            "timezone": "Database Timezone",
            "database": "target",
            "username": "root",
            "password": "Gotapd8"
        }
    }
    auto_mysql_source = {
        "name": "auto_mysql_source",
        "database_type": database_type,
        "database_host": "47.115.163.10",
        "database_port": "3306",
        "database_name": "source",
        "database_username": "root",
        "plain_password": "zsj@520wm",
        "connection_type": source_and_target,
        "config": {
            "host": "47.115.163.10",
            "port": 3306,
            "timezone": "Database Timezone",
            "database": "source",
            "username": "root",
            "password": "zsj@520wm"
        }
    }
    auto_mysql_target = {
        "name": "auto_mysql_target",
        "database_type": database_type,
        "database_host": "47.115.163.10",
        "database_port": "3306",
        "database_name": "target",
        "database_username": "root",
        "plain_password": "zsj@520wm",
        "connection_type": source_and_target,
        "config": {
            "host": "47.115.163.10",
            "port": 3306,
            "timezone": "Database Timezone",
            "database": "target",
            "username": "root",
            "password": "zsj@520wm"
        }
    }


class MongoDB:
    database_type = 'MongoDB'
    AUTO_MONGODB_4212_SOURCE = {
        "name": "AUTO_MONGODB_4212_SOURCE",
        'additionalString': 'authSource=admin',
        "database_type": database_type,
        "database_host": "192.168.1.183:24212",
        "database_port": "24212",
        "database_name": source_db,
        "database_username": "root",
        "plain_password": "Gotapd8",
        "connection_type": source,
        'config': {
            'uri': 'mongodb://root:Gotapd8@192.168.1.183:24212/source?authSource=admin'
        },
        **share_cdc
    }
    AUTO_MONGODB_4212_TARGET = {
        "name": "AUTO_MONGODB_4212_TARGET",
        'additionalString': 'authSource=admin',
        "database_type": database_type,
        "database_host": "192.168.1.183:24212",
        "database_port": "24212",
        "database_name": target_db,
        "database_username": "root",
        "plain_password": "Gotapd8",
        "connection_type": target,
        'config': {
            'uri': 'mongodb://root:Gotapd8@192.168.1.183:24212/target?authSource=admin'
        },
    }
    yun_source = {
        "name": "yun_source",
        "database_type": database_type,
        "database_host": "36.134.131.197:27029",
        "database_port": "27029",
        "database_name": "source",
        "database_username": "",
        "plain_password": "",
        'additionalString': 'authSource=admin',
        "connection_type": source_and_target,
        'config': {
            'uri': 'mongodb://36.134.131.197:27029/source?authSource=admin'
        }
    }

    yun_target = {
        "name": "yun_target",
        "database_type": database_type,
        "database_host": "36.134.131.197:27029",
        "database_port": "27029",
        "database_name": "target",
        "database_username": "",
        "plain_password": "",
        'additionalString': 'authSource=admin',
        "connection_type": source_and_target,
        'config': {
            'uri': 'mongodb://36.134.131.197:27029/target?authSource=admin'
        }
    }


class Postgres:
    database_type = 'PostgreSQL'
    others = {
        "thin_type": "SID",
        "pgsql_log_decorder_plugin_name": "wal2json_streaming",
        "additionalString": "autosave=always&cleanupSavePoints=ture",
    }
    new_others = {
        'logPluginName': 'wal2json'
    }
    AUTO_POSTGRES_1206_SOURCE = {
        "name": "AUTO_POSTGRES_1206_SOURCE",
        "database_type": database_type,
        "database_host": common_ip,
        "database_port": "5437",
        "database_name": source_db,
        "database_owner": "public",
        "database_username": "root",
        "plain_password": "Gotapd8#",
        "connection_type": source,
        **others,
        "config": {"host": common_ip,
                   "port": 5437,
                   "database": "source",
                   "schema": "public",
                   "user": "root",
                   **new_others,
                   "password": "Gotapd8#"},
        **share_cdc
    }
    AUTO_POSTGRES_1206_TARGET = {
        "name": "AUTO_POSTGRES_1206_TARGET",
        "database_type": database_type,
        "database_host": common_ip,
        "database_port": "5437",
        "database_name": target_db,
        "database_owner": "public",
        "database_username": "root",
        "plain_password": "Gotapd8#",
        "connection_type": target,
        **others,
        "config": {"host": common_ip,
                   "port": 5437,
                   "database": "target",
                   "schema": "public",
                   "user": "root",
                   **new_others,
                   "password": "Gotapd8#"}
    }
    postgres_5437 = {
        "name": "postgres_5437",
        "database_type": database_type,
        "database_host": common_ip,
        "database_port": "5437",
        "database_name": "postgres",
        "database_owner": "public",
        "database_username": "root",
        "plain_password": "Gotapd8#",
        "connection_type": source_and_target,
        **others,
        "config": {"host": common_ip,
                   "port": 5437,
                   "database": "postgres",
                   "schema": "public",
                   "user": "root",
                   **new_others,
                   "password": "Gotapd8#"}
    }

    postgres_5437_target = {
        "name": "postgres_5437_target",
        "database_type": database_type,
        "database_host": common_ip,
        "database_port": "5437",
        "database_name": "target",
        "database_owner": "public",
        "database_username": "root",
        "plain_password": "Gotapd8#",
        "connection_type": source_and_target,
        **others,
        "config": {"host": common_ip,
                   "port": 5437,
                   "database": "target",
                   "schema": "public",
                   "user": "root",
                   **new_others,
                   "password": "Gotapd8#"}
    }


class Oracle:
    database_type = 'Oracle'

    AUTO_ORACLE_niko_TARGET = {
        "name": "AUTO_ORACLE_niko_TARGET",
        "database_type": database_type,
        "database_host": common_ip,
        "database_port": "15212",
        "database_name": "ORCLCDB",
        "database_owner": "C##ZHANGXIN",
        "database_username": "c##zhangxin",
        "plain_password": "tapdata",
        "connection_type": source_and_target,
        "config": {
            'host': common_ip,
            'logPluginName': 'logMiner',
            'port': 15212,
            'schema': 'C##ZHANGXIN',
            'user': 'c##zhangxin',
            "password": "tapdata",
            "thinType": "SERVICE_NAME",
            'database': 'ORCLCDB',
            'timezone': "",
        }
    }
    oracle_122c_TAPDATA = {
        "name": "oracle_122c_TAPDATA",
        "database_type": database_type,
        "database_host": common_ip,
        "database_port": "15213",
        "database_name": "tap122c",
        "database_owner": "TAPDATA",
        "database_username": "TAPDATA",
        "plain_password": "Gotapd8!",
        "connection_type": source_and_target,
        "database_datetype_without_timezone": "+00:00",
        "config": {
            # 'database': 'tap122c',
            'host': common_ip,
            'logPluginName': 'logMiner',
            'port': 15213,
            'schema': 'TAPDATA',
            'user': 'TAPDATA',
            "password": "Gotapd8!",
            "sid": "tap122c",
            "thinType": "SID",
            'timezone': "",
        }
    }

    AUTO_ORACLE_LOGMINER_SOURCE = {
        "name": "AUTO_ORACLE_LOGMINER_SOURCE",
        "database_type": database_type,
        "database_host": common_ip,
        "database_port": "1521",
        "database_name": "tap122c",
        "database_owner": "TAPDATA",
        "database_username": "TAPDATA",
        "plain_password": "Gotapd8!",
        "connection_type": source_and_target,
        "database_datetype_without_timezone": "+00:00",
        "config": {
            # 'database': 'tap122c',
            'host': '192.168.1.126',
            'logPluginName': 'logMiner',
            'port': 1521,
            'schema': 'TAPDATA',
            'user': 'TAPDATA',
            "password": "Gotapd8!",
            "sid": "tap122c",
            "thinType": "SID"
        }
    }

    oracle_132 = {
        "name": "oracle_132",
        "database_type": database_type,
        "database_host": "192.168.1.132",
        "database_port": "1521",
        "database_name": "tap11g132",
        "database_owner": "TAPDATA",
        "database_username": "tapdata",
        "plain_password": "Gotapd8!",
        "connection_type": source_and_target,
    }

    oracle_19c_TAPDATA = {
        "name": "oracle_19c_TAPDATA",
        "database_type": database_type,
        "database_host": common_ip,
        "database_port": "1521",
        "database_name": "tap19c",
        "database_owner": "TAPDATA",
        "database_username": "TAPDATA",
        "plain_password": "Gotapd8!",
        "database_password": "582d5cb45f75be4f670192ac1aabeec2",
        "connection_type": source_and_target,
        "config": {
            'host': '192.168.1.126',
            'logPluginName': 'logMiner',
            'port': 1521,
            'schema': 'TAPDATA',
            'user': 'TAPDATA',
            "password": "Gotapd8!",
            "sid": "tap19c",
            "thinType": "SID"
        }
    }

    AUTO_ORACLE_11g_SOURCE = {
        "name": "AUTO_ORACLE_11g_SOURCE",
        "database_type": database_type,
        "database_host": common_ip,
        "database_port": "1521",
        "database_name": "tap11g",
        "database_owner": "USERQ",
        "database_username": "USERQ",
        "plain_password": "PlanQsuccesS!",
        "connection_type": source_and_target,
        "config": {
            'database': 'tap11g',
            'host': '192.168.1.126',
            'logPluginName': 'logMiner',
            'port': 1521,
            'schema': 'USERQ',
            'user': 'USERQ'
        }
    }
    ROBOT = {
        "name": "ROBOT",
        "database_type": database_type,
        "database_host": "192.168.0.105",
        "database_port": "1521",
        "database_name": "NIKO",
        "database_owner": "C##ROBOT",
        "database_username": "C##ROBOT",
        "plain_password": "Gotapd8",
        "connection_type": source_and_target,
    }


class Sqlserver:
    database_type = "SQL Server"

    sqlserver_2019_source = {
        "name": "sqlserver_2019_source",
        "database_type": database_type,
        "database_host": common_ip,
        "database_port": "11434",
        "database_name": "source",
        "database_owner": "dbo",
        "database_username": "sa",
        "plain_password": "Gotapd8-",
        "connection_type": source_and_target,
        "config": {
            'password': 'Gotapd8-',
            'database': 'source',
            'host': common_ip,
            'port': 11434,
            'schema': 'dbo',
            'timezone': '',
            'user': 'sa',
        }
    }

    sqlserver_2019_target = {
        "name": "sqlserver_2019_target",
        "database_type": database_type,
        "database_host": common_ip,
        "database_port": "11434",
        "database_name": "target",
        "database_owner": "dbo",
        "database_username": "sa",
        "plain_password": "Gotapd8-",
        "connection_type": source_and_target,
        "config": {
            'password': 'Gotapd8-',
            'database': 'target',
            'host': common_ip,
            'port': 11434,
            'schema': 'dbo',
            'timezone': '',
            'user': 'sa',
        }
    }


class ES:
    database_type = "Elasticsearch"
    ES_183_have_password = {
        "name": "ES_183_have_password",
        "database_type": database_type,
        "connection_type": target,
        "database_host": common_ip,
        "database_port": "9200",
        "database_name": "",
        "database_username": "elastic",
        "database_password": "",
        "plain_password": "123456",
        "config": {
            'host': '192.168.1.183',
            'port': 9200,
            'user': 'elastic',
            'password': '123456'
        }
    }

    ES_189 = {
        "name": "ES_189",
        "database_type": database_type,
        "connection_type": target,
        "database_host": common_ip,
        "database_port": "9204",
        "database_name": "",
        "database_username": "",
        "database_password": "",
        "plain_password": "",
        "config": {
            'host': '192.168.1.189',
            'port': 9204,
        }
    }


class OceanBase:
    database_type = 'Oceanbase'
    AUTO_OCEANBASE = {
        "name": "AUTO_OCEANBASE",
        "database_type": database_type,
        "database_host": common_ip,
        "database_port": "2881",
        "database_name": "target",
        "database_username": "root",
        "plain_password": "rootPWD123",
        "connection_type": target,
        "config": {
            "host": common_ip,
            "port": 2881,
            "timezone": "",
            "database": "target",
            "user": "root",
            "password": "rootPWD123"
        }
    }


class Doris:
    database_type = 'Doris'

    AUTO_DORIS = {
        "name": "AUTO_DORIS",
        "database_type": database_type,
        "database_host": common_ip,
        "database_port": "9030",
        "database_name": "target",
        "database_username": "root",
        "plain_password": "",
        "connection_type": target,
        "config": {
            "host": common_ip,
            "port": 9030,
            "timezone": "",
            "database": "target",
            "user": "root",
            "password": "",
            "dorisHttp": "192.168.1.183:8040"
        }
    }

    AUTO_DORIS_EXAMPLE_DB = {
        "name": "AUTO_DORIS_EXAMPLE_DB",
        "database_type": database_type,
        "database_host": common_ip,
        "database_port": "9030",
        "database_name": "example_db",
        "database_username": "root",
        "plain_password": "",
        "connection_type": target,
        "config": {
            "host": common_ip,
            "port": 9030,
            "timezone": "",
            "database": "example_db",
            "user": "root",
            "password": "",
            "dorisHttp": "192.168.1.183:8040"
        }
    }


class Dummy:
    database_type = 'Dummy'

    table_fields = [
        {
            'type': 'uuid',
            'pri': True,
            'name': 'pk',
        },
        {
            'type': 'rstring',
            'pri': False,
            'name': 'title',
        },
    ]

    AUTO_DUMMY_SOURCE = {
        "name": "AUTO_DUMMY_SOURCE",
        "database_type": database_type,
        "connection_type": source,
        "config": {
            'incremental_interval': 15000,
            'incremental_interval_totals': 1,
            'incremental_types': [1, 2, 3],
            'initial_totals': 1,
            'table_fields': table_fields,
            'table_name': 'auto_dummy',
            'write_interval': 1000,
            'write_interval_totals': 1,
            'write_log': True
        }
    }

    AUTO_DUMMY_TARGET = {
        "name": "AUTO_DUMMY_TARGET",
        "database_type": database_type,
        "connection_type": target,
        "config": {
            # 'incremental_interval': 1000,
            # 'incremental_interval_totals': 1,
            # 'incremental_types': [1, 2, 3],
            # 'initial_totals': 1,
            # 'table_fields': table_fields,
            # 'table_name': 'auto_dummy',
            'write_interval': 1000,
            'write_interval_totals': 1,
            'write_log': True
        }
    }


class Gbase8a:
    database_type = 'GBase-8a'

    AUTO_Gbase8a = {
        "name": "AUTO_Gbase8a",
        "database_type": database_type,
        "database_host": common_ip,
        "database_port": "5258",
        "database_name": "target",
        "database_username": "root",
        "plain_password": "root",
        "connection_type": target,
        "config": {
            "host": common_ip,
            "port": 5258,
            "timezone": "",
            "database": "target",
            "user": "root",
            "password": "root",
            "extParams": "",
        }
    }


class Gbase8s:
    database_type = 'GBase-8s'

    AUTO_Gbase8s = {
        "name": "AUTO_Gbase8s",
        "database_type": database_type,
        "database_host": common_ip,
        "database_port": "9088",
        "database_name": "testdb",
        "database_username": "gbasedbt",
        "plain_password": "GBase123",
        "connection_type": target,
        "config": {
            "host": common_ip,
            "port": 9088,
            "timezone": "",
            "database": "testdb",
            "schema": 'testdb',
            "user": "gbasedbt",
            "password": "GBase123",
            "extParams": ":delimident=y",
        }
    }


class ActiveMQ:
    database_type = 'ActiveMQ'
    AUTO_ACTIVEMQ_SOURCE = {
        "name": "AUTO_ACTIVEMQ_SOURCE",
        'database_type': database_type,
        'connection_type': source,
        'mqType': '0',
        'brokerURL': 'tcp://192.168.1.183:61616',
        'pythonURL': 'tcp://192.168.1.183:61613',
        'mqUserName': 'admin',
        'mqPassword': 'admin',
        "config": {
            'brokerURL': 'tcp://192.168.1.183:61616',
            'mqPassword': 'admin',
            'mqUsername': 'admin',
            # 'mqQueueString': '',
        },
        'pdk': True
    }
    AUTO_ACTIVEMQ_TARGET = {
        "name": "AUTO_ACTIVEMQ_TARGET",
        'database_type': database_type,
        'connection_type': target,
        'mqType': '0',
        'brokerURL': 'tcp://192.168.1.183:61616',
        'pythonURL': 'tcp://192.168.1.183:61613',
        'mqUserName': 'admin',
        'mqPassword': 'admin',
        "config": {
            'brokerURL': 'tcp://192.168.1.183:61616',
            'mqPassword': 'admin',
            'mqUsername': 'admin',
            # 'mqQueueString': '',
        },
        'pdk': True
    }


class RabbitMQ:
    database_type = 'RabbitMQ'

    AUTO_RABBITMQ_SOURCE = {
        'name': 'AUTO_RABBITMQ_SOURCE',
        'database_type': database_type,
        'connection_type': source,
        'database_host': '192.168.1.183',
        'database_port': '15674',
        'mqUserName': 'admin',
        'mqPassword': 'admin',
        'virtualHost': "/",
        'config': {
            'apiPort': 8090,
            'mqHost': '192.168.1.183',
            'mqPort': 15674,
            'mqUsername': 'admin',
            'mqPassword': 'admin',
            'virtualHost': '/'
        },
        'pdk': True
    }

    AUTO_RABBITMQ_TARGET = {
        'name': 'AUTO_RABBITMQ_TARGET',
        'database_type': database_type,
        'connection_type': target,
        'database_host': '192.168.1.183',
        'database_port': '15674',
        'mqUserName': 'admin',
        'mqPassword': 'admin',
        'virtualHost': "/",
        'config': {
            'apiPort': 8090,
            'mqHost': '192.168.1.183',
            'mqPort': 15674,
            'mqUsername': 'admin',
            'mqPassword': 'admin',
            'virtualHost': '/'
        },
        'pdk': True
    }


class RocketMQ:
    database_type = 'RocketMQ'
    AUTO_ROCKETMQ_SOURCE = {
        'name': 'AUTO_ROCKETMQ_SOURCE',
        'database_type': database_type,
        'connection_type': source,
        'database_host': '192.168.1.126',
        'database_port': '9876',
        'mqUserName': '',
        'mqPassword': '',
        'config': {
            'mqHost': '192.168.1.126',
            'mqPort': 9876,
            'producerGroup': 'tapdata',
            'consumerGroup': 'tapdata',
            'useTLS': False
        },
        'pdk': True
    }

    AUTO_ROCKETMQ_TARGET = {
        'name': 'AUTO_ROCKETMQ_TARGET',
        'database_type': database_type,
        'connection_type': target,
        'database_host': '192.168.1.126',
        'database_port': '9876',
        'mqUserName': '',
        'mqPassword': '',
        'config': {
            'mqHost': '192.168.1.126',
            'mqPort': 9876,
            'producerGroup': 'tapdata',
            'consumerGroup': 'tapdata',
            'useTLS': False
        },
        'pdk': True
    }


class Kafka:
    database_type = "Kafka"

    AUTO_KAFKA_SOURCE = {
        "name": "AUTO_KAFKA_SOURCE",
        "database_type": database_type,
        "kafkaBootstrapServers": "192.168.1.183:9093",
        "connection_type": source,
        "kafkaPatternTopics": ".",
        "database_username": "",
        "database_password": "",
        "plain_password": "",
        "config": {
            "kafkaAcks": "-1",
            "kafkaCompressionTyhpe": "gzip",
            "kafkaIgnoreInvalidRecord": False,
            "kafkaIgnorePushError": False,
            "kafkaSalMechanism": "PLAIN",
            "krb5": False,
            "nameSrvAddr": "192.168.1.183:9093"
        },
        'pdk': True
    }

    AUTO_KAFKA_TARGET = {
        "name": "AUTO_KAFKA_TARGET",
        "database_type": database_type,
        "kafkaBootstrapServers": "192.168.1.183:9092",
        "connection_type": target,
        "kafkaPatternTopics": ".",
        "database_username": "",
        "database_password": "",
        "plain_password": "",
        "config": {
            "kafkaAcks": "-1",
            "kafkaCompressionTyhpe": "gzip",
            "kafkaIgnoreInvalidRecord": False,
            "kafkaIgnorePushError": False,
            "kafkaSalMechanism": "PLAIN",
            "krb5": False,
            "nameSrvAddr": "192.168.1.183:9092"
        },
        'pdk': True
    }


class ClickHouse:
    database_type = "Clickhouse"

    AUTO_CLICKHOUSE_TARGET = {
        "name": "AUTO_CLICKHOUSE_TARGET",
        "database_type": database_type,
        "database_host": common_ip,
        'python_port': '9002',
        "database_port": "9123",
        "database_name": "default",
        "database_username": "default",
        "plain_password": "Gotapd8!!",
        "connection_type": target,
        "config": {
            "host": common_ip,
            "port": 9123,
            "timezone": "",
            "database": "default",
            "user": "default",
            "password": "Gotapd8!!"
        }
    }


class Redis:
    database_type = "Redis"

    AUTO_REDIS_TARGET01 = {
        "name": "AUTO_REDIS_TARGET01",
        "database_type": database_type,
        "database_host": "192.168.1.179",
        "database_port": "6379",
        "database_name": "0",
        "database_username": "",
        "plain_password": "123456",
        "connection_type": target,
        "config": {
            "database": "0",
            'deploymentMode': 'standalone',
            'passwordDisplay': True,
            "host": "192.168.1.179",
            "port": 6379,
            "password": "123456"
        }
    }


class DB2:
    database_type = 'DB2'
    AUTO_DB2_SOURCE = {
        "name": "AUTO_DB2_SOURCE",
        "database_type": database_type,
        "connection_type": source,
        "database_host": "192.168.1.132",
        "database_port": "40024",
        "database_name": "TESTDB",
        "database_username": "db2inst1",
        "plain_password": "admin",
        "database_owner": "SOURCE",
        "config": {
            'database': 'TESTDB',
            'host': '192.168.1.132',
            'port': 40024,
            'rawLogServerHost': '192.168.1.132',
            'rawLogServerPort': 50031,
            'schema': 'SOURCE',
            'user': 'db2inst1',
            "password": "admin"
        }
    }

    AUTO_DB2_TARGET = {
        "name": "AUTO_DB2_TARGET",
        "database_type": database_type,
        "connection_type": source,
        "database_host": "192.168.1.132",
        "database_port": "40024",
        "database_name": "TESTDB",
        "database_username": "db2inst1",
        "plain_password": "admin",
        "database_owner": "TARGET",
        "config": {
            'database': 'TESTDB',
            'host': '192.168.1.132',
            'port': 40024,
            'rawLogServerHost': '192.168.1.132',
            'rawLogServerPort': 50031,
            'schema': 'TARGET',
            'user': 'db2inst1',
            "password": "admin"
        }
    }


class Hive:
    database_type = 'hive1'

    AUTO_HIVE_TARGET = {
        "name": "AUTO_HIVE_TARGET",
        "database_type": database_type,
        "connection_type": target,
        "database_host": "192.168.1.179",
        'python_port': '10000',
        "database_port": "10000",
        "database_name": "default",
        "database_username": "default",
        "config": {
            'database': 'default',
            'host': '192.168.1.179',
            'port': 10000,
            'timezone': "",
            'user': "default"
        }
    }
